<?php
    /*连接腾讯云服务器
     *$host = "gz-cdb-pq05wk5j.sql.tencentcdb.com"; // 填入云MySQL数据库的主机地址
     *$port = "26209"; // 填入对应的端口号，如3306
     *$dbname = "member";
     *$username = "root";
     *$password = "mjh190912";
    */
    //连接数据库服务器
    //②连接数据库(腾讯云)
    $conn = mysqli_connect("gz-cdb-pq05wk5j.sql.tencentcdb.com","root","mjh190912", "member", '26209');
//    //①连接数据库(本地数据库)
//    $conn = mysqli_connect("localhost","root","root", "member");
    if(!$conn){
        die( "连接失败！");
    }
    //②设定字符集
    mysqli_query($conn, "set names utf8");